<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .rocket {
            width: 149px;
            height: 249px;
            margin: 0 auto;
            border: 1px solid black;
            background-image: url(./rocket.png);
        }

        @keyframes fly {
            from {
                background-position: -296px 0px;
            }

            to {
                background-position: -892px 0;
            }
        }

        .rocket:hover {
            animation: fly 0.4s steps(4) 0s infinite;
        }
    </style>
</head>

<body>
    <div class="rocket"></div>
</body>

</html>